package com.coin900.coin.service.coin;

import com.coin900.coin.persist.coin.CoinNoticeVO;
import com.value.mybatis.IDaoRouter;
import com.value.mybatis.Pagination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 通知公告
 *
 * @author shui
 * @create 2018-2-5
 */
@Service
public class CoinNoticeService implements ICoinNoticeService {

    @Override
    public List<CoinNoticeVO> loadCoinNotice(Map<String, Object> params) {
        return this.daoRouter.query("CoinNotice.loadCoinNotice", params);
    }

    @Override
    public List<CoinNoticeVO> loadCoinNoticeForPage(Pagination pagination) {
        return this.daoRouter.query("CoinNotice.loadCoinNoticeForPage", pagination);
    }

    @Override
    public void insertCoinNotice(CoinNoticeVO coinNoticeVO) {
        this.daoRouter.insert("CoinNotice.insertCoinNotice", coinNoticeVO);
    }

    @Override
    public void updateCoinNotice(CoinNoticeVO coinNoticeVO) {
        this.daoRouter.update("CoinNotice.updateCoinNotice", coinNoticeVO);
    }

    @Override
    public void deleteCoinNotice(CoinNoticeVO coinNoticeVO) {
        this.daoRouter.update("CoinNotice.deleteCoinNotice", coinNoticeVO);
    }

    @Autowired
    private IDaoRouter daoRouter;

}